<template>
  <div class="about">
    <ul>
      <li v-for="(item, index) in $store.state.readList" :key="index">
        {{ item }}
        <div>
          <el-button type="warning" size="small" @click="jump(index)"
            >标记未读</el-button
          >
          <el-button type="danger" size="small" @click="del(index)"
            >删除</el-button
          >
        </div>
      </li>
    </ul>
    <el-button @click="alladd">全部</el-button>
  </div>
</template>
<script>
export default {
  methods: {
    jump(i) {
      this.$store.commit("sendList", { style: "read", index: i });
    },
     del(i) {
      this.$store.commit("sendList", { style: "recycle", index: i });
    },
     alladd(){
      this.$store.commit("allList", 'read');
    }
  },
};
</script>
